package com.sgb.merchant.api;

import com.sgb.link.entity.UserInfo;
import com.sgb.link.entity.merchant.ApplyDetailEntity;
import com.sgb.link.entity.merchant.ApplyEntity;
import com.sgb.link.entity.merchant.DemandDetailEntity;
import com.sgb.link.entity.merchant.DemandInfoEntity;
import com.sgb.link.entity.merchant.DemandListEntity;
import com.sgb.link.entity.merchant.DemandType;
import com.sgb.link.entity.merchant.DynamicListEntity;
import com.sgb.link.entity.merchant.EditIndustryInfoEntity;
import com.sgb.link.entity.merchant.EnrolInfoEntiy;
import com.sgb.link.entity.merchant.FileInfo;
import com.sgb.link.entity.merchant.IndustryCategoryEntity;
import com.sgb.link.entity.merchant.IndustryDetailEntity;
import com.sgb.link.entity.merchant.IndustryListEntity;
import com.sgb.link.entity.merchant.InvestmentDetailEntity;
import com.sgb.link.entity.merchant.InvestmentEntity;
import com.sgb.link.entity.merchant.InvestmentOptions;
import com.sgb.link.entity.merchant.InvestmentProjectEntity;
import com.sgb.link.entity.merchant.PublishIndustryEntity;
import com.sgb.link.entity.merchant.SelfProjectList;
import com.sgb.link.entity.merchant.TradeCategoryEntity;
import com.sgb.net.entity.ListResponse;
import com.swgk.core.base.model.entity.BaseEntity;

import java.util.List;
import java.util.Map;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.PATCH;
import retrofit2.http.POST;
import retrofit2.http.PartMap;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

/**
 * Time:2021/6/16
 * Author:黄淋
 * Description:招商引资接口
 */
public interface MerchantsService {



    @POST("invite/v2/app/investment/investmentList")
    Call<BaseEntity<ListResponse<List<InvestmentProjectEntity>>>> getInvestmentList(@Body Map map);
    //用户中心-我的项目列表
    @POST("invite/v2/app/investment/itemList")
    Call<BaseEntity<ListResponse<List<SelfProjectList>>>> getSelfProject(@Body Map map);
    //一级分类菜单
    @GET("invite/v2/app/investment/firstCategoryList")
    Call<BaseEntity<List<TradeCategoryEntity>>> getindustryFirstCategoryList();
    //项目投资详情
    @GET("invite/v2/app/investment/detail/{itemNo}")
    Call<BaseEntity<InvestmentDetailEntity>> getInvestmentDetail(@Path("itemNo") Long itemNo);
    //项目投资报名单位
    @GET("invite/v2/app/investment/applyList")
    Call<BaseEntity<ListResponse<List<EnrolInfoEntiy>>>> getEnrolList(@Query("itemNo") Long itemNo,@Query("page") int page,@Query("limit") int limit);
    //需求分类菜单
    @POST("imInvestmentDemandTypes/demandsTypeMenu")
    Call<BaseEntity<List<DemandType>>> getType();
    //需求列表
    @POST("imInvestmentDemands/findCPage")
    Call<BaseEntity<ListResponse<List<DemandListEntity>>>> getDemandList(@Body Map map);
    //获取IM用户信息
    @GET("user/im/getImInfo/{no}")
    Call<BaseEntity<UserInfo>> getImInfo(@Path("no") String no);
    //详情关注 type FT1.投资项目关注 FT2.投资需求关注
    @GET("imUserFollows/followItem/{no}/{type}")
    Call<BaseEntity> follow(@Path("no") long no,@Path("type") String type);
    //需求详情
    @GET("imInvestmentDemands/details/{no}")
    Call<BaseEntity<DemandDetailEntity>> getDemandsDetail(@Path("no") String no);
    //推荐列表
    @GET("imInvestmentDemands/recommends/{no}")
    Call<BaseEntity<ListResponse<List<DemandListEntity>>>> getDemandsRecommends(@Path("no") String no,@Query("typeNo") String typeNo);
    //投资项目状态判断
    @GET("invite/v2/app/investment/getStatus/{no}")
    Call<BaseEntity<Integer>> getProjectState(@Path("no") Long no);
    //投资需求状态判断
    @GET("imInvestmentDemands/getStatus/{no}")
    Call<BaseEntity<Integer>> getDemandsState(@Path("no") String no);
    //投资项目删除
    @DELETE("invite/v2/app/investment/delItem/{itemNo}")
    Call<BaseEntity> delProject(@Path("itemNo") Long no);
    //发布投资项目
    @POST("invite/v2/app/investment/edit")
    Call<BaseEntity> editProject(@Body Map map);
    //发布投资项目要求内容
    @POST("imItemDemand/edit")
    Call<BaseEntity> editProjectInfo(@Body InvestmentEntity entity);
    //投资项目分类
    @GET("invite/v2/app/investment/getIndustryCategoryTree")
    Call<BaseEntity<List<IndustryCategoryEntity<List<IndustryCategoryEntity<List<IndustryCategoryEntity<List<IndustryCategoryEntity>>>>>>>>> getCategoryList();
    //上传单个文件，支持点击链接浏览器下载
    @Multipart
    @POST("invite/operate/file/addFile")
    Call<com.swgk.core.base.model.entity.BaseEntity> addFile(@PartMap Map<String, RequestBody> files);

    //提交报名
    @POST("imItemApply/addApply")
    Call<BaseEntity<String>> addApply(@Body Map map);

    //我的报名列表
    @POST("imItemApply/myApply")
    Call<BaseEntity<ListResponse<List<ApplyEntity>>>> myApply(@Body Map map);
    //报名详情
    @GET("imItemApply/myApplyDetails")
    Call<BaseEntity<ApplyDetailEntity>> getApplyDetail(@Query("applyNo") String itemNo);
    //我的投资需求列表
    @POST("imInvestmentDemands/findPage")
    Call<BaseEntity<ListResponse<List<DemandListEntity>>>> getSelfDemandList(@Body Map map);
    //删除投资需求
    @DELETE("imInvestmentDemands/deleteByNo")
    Call<BaseEntity> delDemand(@Query("no") String no);
    //投资需求上下架
    @PATCH("imInvestmentDemands/updateStatus")
    Call<BaseEntity> updateDemands(@Query("no") String no,@Query("status") String status);
    //投资需求发布和编辑
    @POST("imInvestmentDemands/edit")
    Call<BaseEntity> editDemands(@Body Map map);
    //获取文件信息
    @GET("investment/file/getFileInfo")
    Call<BaseEntity<FileInfo>> getFileInfo(@Query("fileUrl")String fileUrl);
    //税收优惠，土地优惠，立项阶段,产能规模分类菜单
    @POST("invite/v2/app/investment/getOptions")
    Call<BaseEntity<InvestmentOptions>> getOptions();
    //投资项目上下架
    @PATCH("invite/v2/app/investment/updateStatus")
    Call<BaseEntity> updateInvestment(@Query("no") long no,@Query("status") String status);

    //产能规模分类菜单
    @POST("invite/v2/app/investment/getOptions")
    Call<BaseEntity<InvestmentOptions>> getCapacityScaleOptions(@QueryMap Map<String, Object> map);

    //产业园区类型
    @GET("imIndustrialParkTypes/findList")
    Call<BaseEntity<List<IndustryCategoryEntity>>> getParkTypes();
    //首页-产业园区列表
    @POST("imIndustrialParks/pc/findPage")
    Call<BaseEntity<ListResponse<List<IndustryListEntity>>>> getParksList(@Body Map map);

    //行政等级
    @GET("imAssistantSectionLevels/findList")
    Call<BaseEntity<List<IndustryCategoryEntity>>> getParkLevels();

    //行政等级
    @GET("imIndustrialClusters/findList")
    Call<BaseEntity<List<IndustryCategoryEntity>>> getParkClusters();

    //办公优惠
    @GET("imOfficePreference/findList")
    Call<BaseEntity<List<IndustryCategoryEntity>>> getParkDiscount();
    //基础设施
    @GET("ImInfrastructure/findList")
    Call<BaseEntity<List<IndustryCategoryEntity>>> getParkDevice();

    //产业园区状态
    @GET("imIndustrialParks/getStatus/{no}")
    Call<BaseEntity<Integer>> getIndustryState(@Path("no") String no);

    //首页产业园区详情
    @GET("imIndustrialParks/getDetails/{no}")
    Call<BaseEntity<IndustryDetailEntity>> getParksDetail(@Path("no") String no);
    //我的产业园区详情
    @GET("imIndustrialParks/userCenter/getDetails/{no}")
    Call<BaseEntity<IndustryDetailEntity>> getParksSelfDetail(@Path("no") String no);

    //编辑产业园区数据回显
    @GET("imIndustrialParks/userCenter/getEditDetails/{no}")
    Call<BaseEntity<EditIndustryInfoEntity>> getParksDetailInfo(@Path("no") String no);

    //动态列表
    @POST("imIndustrialParkTrends/findPage")
    Call<BaseEntity<ListResponse<List<DynamicListEntity>>>> getDynamicList(@Body Map map);

    //首页-产业园区列表
    @POST("imIndustrialParks/findPage")
    Call<BaseEntity<ListResponse<List<IndustryListEntity>>>> getSelfParksList(@Body Map map);

    //产业园区上下设置
    @GET("imIndustrialParks/updateStatus/{no}/{status}")
    Call<BaseEntity> setStatus(@Path("no") String no,@Path("status") String status);

    //产业园区删除
    @GET("imIndustrialParks/deleteByNo/{no}")
    Call<BaseEntity> delParks(@Path("no") String no);

    //新增动态
    @POST("imIndustrialParkTrends/edit")
    Call<BaseEntity> editParkTrends(@Body DynamicListEntity body);

    @GET("imIndustrialParkTrends/deleteByNo/{no}")
    Call<BaseEntity> delParkTrends(@Path("no") String no);

    @POST("imIndustrialParks/edit")
    Call<BaseEntity> editParks(@Body PublishIndustryEntity body);
}
